PreviewStack
Description
call the PreviewStack interface to preview the resource stack information to be created by the specified template.
Request Method
POST
Request Path
/apsara/route/ROS/PreviewStack
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Parameters.N.ParameterKey | BODY | string | Yes | InstanceType | the name of the parameter. If the name and value of the parameter are not specified, ROS will use the default value specified in the template. The maximum value of n is 200. description Parameters as an optional parameter. if the Parameters needs to be specified, the Parameters. n. ParameterKey and Parameters. n. ParameterValue must be specified at the same time. |
Parameters.N.ParameterValue | BODY | string | Yes | ecs.cm4.6xlarge | parameter value. The maximum value of n is 200. description Parameters as an optional parameter. if the Parameters needs to be specified, the Parameters. n. ParameterKey and Parameters. n. ParameterValue must be specified at the same time. |
TemplateBody | BODY | string | No | {"ROSTemplateFormatVersion": "2015-09-01" } | the structure of the template body. The length is 1~524 and 288 bytes. If the length is large, it is recommended to pass the parameters in the request body through HTTP POST + Body Param to avoid request failure due to too long URL. description you must specify the parameter TemplateBody or TemplateURL, but not at the same time. |
StackPolicyBody | BODY | string | No | {"Statement": [{"Action": "Update:*", "Resource": "*", "Effect": "Allow", "Principal": "*"}]} | contains the structure of the resource stack policy body, with a length of 1~16,384 bytes. description you must specify StackPolicyBody or StackPolicyURL parameters, but not at the same time. |
StackPolicyURL | BODY | string | No | oss://ros-stack-policy/demo | the location of the file containing the resource stack policy. The URL must point to a policy located in a Web server (HTTP or HTTPS) or Aliyun OSS bucket (for example, oss:// ros/stack-policy/demo, oss:// ros/stack-policy/demo?RegionId = cn-hangzhou). The maximum length of the policy file is 16 and 384 bytes. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify the parameter StackPolicyBody or StackPolicyURL, but not at the same time. The maximum length of the URL is 1350 bytes. |
version | BODY | string | No | 2016-01-01 | version of api |
TemplateURL | BODY | string | No | oss://ros-template/demo | the location of the file containing the template body. The URL must point to the template (1~524,288 bytes) located in the HTTP Web server (HTTP or HTTPS) or Aliyun OSS bucket. The URL of the OSS bucket is such as oss:// ros/template/demo or oss:// ros/template/demo?RegionId = cn-hangzhou. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify TemplateBody or TemplateURL parameters, but not at the same time. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
RegionId | BODY | string | Yes | cn-beijing | the region ID to which the resource stack belongs. |
ClientToken | BODY | string | No | 123e4567-e89b-12d3-a456-42665544**** | guarantees the idempotence of the request. This value is generated by the client and must be globally unique. is no more than 64 characters in length and can contain English letters, numbers, dashes (-) and underscores (_). |
StackName | BODY | string | Yes | MyStack | resource stack name. must be no more than 255 characters in length and must start with a number or an English letter, which can contain numbers, English letters, dashes (-), and underscores (_). |
DisableRollback | BODY | boolean | No | false | whether to disable the rollback policy when the resource stack creation fails. Value: true: disable rollback, that is, no rollback is performed when the resource stack creation fails. false (default): rollback is not disabled, that is, rollback is performed when the resource stack creation fails. |
TimeoutInMinutes | BODY | long | No | 10 | timeout for creating the resource stack. Unit: minutes. default value: 60. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}